<?php
namespace app\index\model;

/**
 * 文章模型
 */
class Articles extends \think\Model
{
	protected $table = 'articles';
	protected $type = [
		'list_view' => 'array'
	];
	public function addArticle($data){
		try {
		    self::create($data, true);
		} catch (\Exception $e) {
		    throw $e;
		}		
		return ['code' => 200, 'msg' => '添加成功'];
	}
} 
 
?>